Skip to content

feat: Optional Email Sterilization#14797

Open
francesco-hayes wants to merge 2 commits intopayloadcms:mainfrom
francesco-hayes:feat/email-steralization
Open

feat: Optional Email Sterilization#14797
francesco-hayes wants to merge 2 commits intopayloadcms:mainfrom
francesco-hayes:feat/email-steralization

Conversation

@francesco-hayes
Copy link
Copy Markdown

What?

A small but valuable change for people who need to encrypt data.

Why?

Currently there is no way (to mine and other's knowledge) to bypass the beforeChange hook for the email field within an auth collection. This makes it impossible for people to encrypt the field as it will lowercase and trim the encryption.

How?

Added sterilize?: boolean to the EmailField type so people can conditionally turn on and off the beforeChange hook that payload automatically injects into the email field.

Pictures of changed code

The changes are very small so the files changed should be pretty clear, but here are some screenshots!

After of email field and hook:

Screenshot 2025-12-02 at 7 01 06 PM

After of the email field's type:

Screenshot 2025-12-02 at 7 01 21 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 3, 2025

Pull Request titles must follow the Conventional Commits specification and have valid scopes.

The subject "Optional Email Sterilization" found in the pull request title "feat: Optional Email Sterilization"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.

feat(ui): add Button component
^    ^    ^
|    |    |__ Subject
|    |_______ Scope
|____________ Type

@francesco-hayes francesco-hayes changed the title Feat: Optional Email Sterilization feat: Optional Email Sterilization Dec 3, 2025
@francesco-hayes francesco-hayes changed the title feat: Optional Email Sterilization feat(auth): Optional Email Sterilization Dec 3, 2025
@francesco-hayes francesco-hayes changed the title feat(auth): Optional Email Sterilization feat: Optional Email Sterilization Dec 3, 2025
@github-actions github-actions Bot added the stale label Feb 20, 2026
@denolfe denolfe added the v3 label Apr 23, 2026
@github-actions github-actions Bot removed the stale label Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants